<template>
  <div class="like-container">
    <h3>猜你喜欢</h3>
    <div class="content-section">
      <div class="content-grid">
        <div v-for="(movie, idx) in movies" :key="idx" class="content-item">
          <img :src="movie.poster" :alt="movie.title">
          <p>{{ movie.title }}</p>
          <span class="rating">{{ movie.rating }}</span>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup>
import { ref } from 'vue';
import img1 from '@/assets/imgs/big_vip/card_img1.png';


// 电影数据
const movies = ref([
  { title: '流浪地球2', poster: img1, rating: '9.2' },
  { title: '满江红', poster: img1, rating: '8.5' },
  { title: '深海', poster: img1, rating: '9.0' },

]);
// 在这里写 Composition API 代码
</script>

<style scoped lang="scss">
// 在这里写 SCSS 样式
.like-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
h3{
  font-size: 24px;
}
  .content-section {
    .content-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
      gap: 20px;
      padding: 0 10px;

      .content-item {
        background: #fff;
        overflow: hidden;
        transition: transform 0.3s;

        &:hover {
          transform: translateY(-5px);
        }

        img {
          width: 100%;
          height: 250px;
          object-fit: cover;
          border-radius: 4px;
        }

        p {
          padding: 10px 5px 0;

          margin: 0;
          white-space: nowrap;
          overflow: hidden;
          text-overflow: ellipsis;
        }

        .rating {
          display: block;
          padding: 5px;
          color: #ff4e4e;
          font-weight: bold;
          font-size: 13px;
        }
      }
    }

    /* 电视剧列表样式 */
    .content-list {
      .list-item {
        display: flex;
        align-items: center;
        padding: 12px;
        background: #fff;
        margin-bottom: 10px;
        border-radius: 6px;
        transition: all 0.3s;

        &:hover {
          box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }

        .rank {
          font-size: 18px;
          font-weight: bold;
          color: #ff4e4e;
          width: 30px;
          text-align: center;
        }

        img {
          width: 80px;
          height: 100px;
          object-fit: cover;
          border-radius: 4px;
          margin-right: 15px;
        }

        .info {
          flex: 1;

          .title {
            font-size: 16px;
            margin: 0 0 5px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
          }

          .meta {
            font-size: 12px;
            color: #999;
            margin: 0;
          }
        }
      }
    }

    /* 综艺内容样式 */
    .show-banner {
      display: flex;
      background: linear-gradient(135deg, #ff4e4e, #ff8e8e);
      border-radius: 8px;
      overflow: hidden;
      margin-bottom: 20px;
      color: white;

      img {
        width: 40%;
        object-fit: cover;
      }

      .show-info {
        padding: 20px;
        flex: 1;

        h4 {
          font-size: 20px;
          margin: 0 0 10px;
        }

        p {
          font-size: 14px;
          opacity: 0.9;
          margin-bottom: 20px;
        }

        .play-btn {
          background: white;
          color: #ff4e4e;
          border: none;
          padding: 8px 20px;
          border-radius: 20px;
          font-weight: bold;
          cursor: pointer;
          transition: all 0.3s;

          &:hover {
            transform: scale(1.05);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
          }
        }
      }
    }

    .show-list {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
      gap: 15px;

      .show-card {
        img {
          width: 100%;
          height: 100px;
          object-fit: cover;
          border-radius: 4px;
          margin-bottom: 8px;
        }

        p {
          font-size: 13px;
          margin: 0;
          text-align: center;
          white-space: nowrap;
          overflow: hidden;
          text-overflow: ellipsis;
        }
      }
    }
  }
}
</style>
